#ifndef RW_LOCK_H
#define RW_LOCK_H 

#define CAS_MIN -100000

typedef struct {
	int val;
} my_rwlock;

void rwlock_init(my_rwlock *plock);
void rwlock_read(my_rwlock *plock);
void rwlock_write(my_rwlock *plock);
void rwunlock_read(my_rwlock *plock);
void rwunlock_write(my_rwlock *plock);

#endif // RW_LOCK_H
